@use '../core' as *;

.learningVideos {
    display: flex;
    flex-direction: column;
    gap: $spacing-size-4;

    @media screen and (max-width: 600px) {
        gap: $spacing-size-2;
    }
}

.titleDurationWrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.title {
    font-size: var(--text-fs-lg);
}

.video {
    display: flex;
    gap: $spacing-size-4;
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    padding: $spacing-size-4;
    margin: $spacing-size-4;
    transition:
        color 0.2s ease-in-out,
        border-color 0.2s ease-in-out;
    width: calc(100% - 2 * $spacing-size-4);
    box-sizing: border-box;
    color: var(--color-text-primary);

    @media screen and (max-width: 1200px) {
        flex-direction: column;
        align-items: flex-start;
    }

    #{$selector-darkmode} & {
        color: var(--color-text-primary);
        text-decoration: none !important;
        background: var(--color-bg-primary);
        border: 1px solid var(--color-border-primary);
    }

    .duration {
        font-size: var(--text-fs-base);
        background: transparent;
        padding: 0 $spacing-size-2;
        border-radius: var(--border-radius);
        margin-left: auto;
    }

    &:hover {
        border-color: var(--color-link-hover);
        #{$selector-darkmode} & {
            border: 1px solid var(--color-util-gray-400);
        }
    }

    h2 {
        font-size: var(--font-size-large);

        @media screen and (min-width: $breakpoint-videos-medium) {
            font-size: var(--font-size-extra-large);
        }
    }

    img {
        width: auto;
        border-radius: var(--radius-sm);
        border: 1px solid var(--color-border-primary);
        transition: border-color $transition-default-timing;

        @media screen and (max-width: 600px) {
            height: 100px;
        }

        @media screen and (min-width: $breakpoint-videos-extra-small) {
            height: 195px;
        }
    }

    .body {
        flex-grow: 1;
        min-width: 50%;
    }

    ul {
        display: flex;
        flex-direction: column;
        width: 100%;
        list-style-type: none;
        gap: $spacing-size-2;
        margin: $spacing-size-4 0 0 0;
    }

    li {
        color: var(--color-text-primary);
        font-size: var(--text-fs-base);
        margin-left: $spacing-size-6;
        position: relative;

        &::before {
            content: '•';
            position: absolute;
            left: -($spacing-size-4);
            top: 50%;
            transform: translateY(-50%);
        }
    }
}
